package com.itdct.onflow.system.monitor.task

import cn.hutool.extra.spring.SpringUtil
import com.itdct.onflow.core.util.TimeUtil
import com.itdct.onflow.core.util.TimeUtil.yyyyMMddHHmmss_HYPHEN
import com.itdct.onflow.system.monitor.manager.SysMachineInfoManager
import com.itdct.onflow.system.task.base.BaseTask
import com.itdct.onflow.system.task.entity.SysTaskEntity
import java.util.*

/**
 * @author Zhouwx
 * @date 2025/10/16 10:04:16
 * @version 1.0
 * @description
 */
class SysMachineCheckOnlineTask : BaseTask() {
    override fun execute(sysTaskEntity: SysTaskEntity) {
        val sysMachineInfoManager = SpringUtil.getBean(SysMachineInfoManager::class.java)
        val timeString = TimeUtil.dateToTimeString(Date(), yyyyMMddHHmmss_HYPHEN)
        sysMachineInfoManager.checkMachineOnline("sysMachineReport:checkOnline:" + timeString)
    }
}